package com.ipfsemc.ipfsemc.quartz;


import com.ipfsemc.ipfsemc.mapper.UserSpaceMapper;
import com.ipfsemc.ipfsemc.model.UserSpace;
import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * 每天凌晨启动矿机
 */
@Slf4j
@Component
public class StartMillJob implements Job {

    @Autowired
    private UserSpaceMapper userSpaceMapper;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        log.info("StartMillJob【开启矿机】" + new Date().toLocaleString());

//        UserSpace userSpace=new UserSpace();
//        userSpace.setStartTime(new Date());
//        userSpaceMapper.startMill(userSpace);


    }

}
